<template>
	<div id="app" :class="flag ? 'grayStyle' : ''"><router-view v-if="show" /></div>
</template>
<script>
import webinfo from '@/mixins/webinfo';
export default {
	mixins: [webinfo],
	data() {
		return {
			flag: false,
			show: false
		};
	},
	mounted() {
		this.getMenu();
		this.$store.dispatch('setwebinfo');
		this.getGrapSite();
		// this.getCont();
	},
	methods: {
		async getGrapSite() {
			let res = await this.$store.dispatch('getDictionaryVal', 'GRAY_SITE');
			this.flag = res[0] == 1;
		},
		//获取网站菜单
		async getMenu() {
			let obj = { status: 1 };
			let res = await this.$store.dispatch('queryOpenApiWebColumn', obj);
			this.config.column = res.data;
			this.$store.commit('SET_HOMECOLUMNDATA', res.data);
			this.show = true;
		},
		async getCont() {
			// let webCount = this.getSession('webCount')
			// if (webCount) return
			let res = await this.$store.dispatch('addWebCount', {});
			this.setSession('webCount', JSON.stringify(res.data[0]));
		}
	}
};
</script>
<style>
* {
	margin: 0;
	padding: 0;
	list-style: none;
}
#app {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top: 0;
	overflow-x: hidden;
	overflow-y: auto;
}
</style>
<style lang="scss">
.grayStyle {
	-webkit-filter: grayscale(100%); /* webkit */
	-moz-filter: grayscale(100%); /*firefox*/
	-ms-filter: grayscale(100%); /*ie9*/
	-o-filter: grayscale(100%); /*opera*/
	filter: grayscale(100%);
	filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
	filter: gray; /*ie9- */
}

.el-aside {
	background-color: transparent !important;
}
.el-radio__input.is-checked .el-radio__inner,
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
	// background-color: $mainColor !important;
	// border-color: $mainColor !important;
}
.el-radio__input.is-checked + .el-radio__label,
.el-link.el-link--default:hover,
.el-checkbox__input.is-checked + .el-checkbox__label {
	// color: $mainColor !important;
}
.search {
	.el-checkbox__input.is-checked .el-checkbox__inner,
	.el-checkbox__input.is-indeterminate .el-checkbox__inner {
		background-color: #f6c131 !important;
		border-color: #f6c131 !important;
	}
	.el-checkbox__input.is-checked + .el-checkbox__label,
	.el-checkbox {
		color: #fff !important;
	}
	.el-checkbox {
		margin-right: 26px;
	}
	.el-checkbox__label {
		font-size: 16px;
	}
}

.el-checkbox__inner:hover,
.el-checkbox__input.is-focus .el-checkbox__inner {
	border-color: $mainColor !important;
}
.el-input.is-active .el-input__inner,
.el-input__inner:focus {
	border-color: #666 !important;
}
.el-tabs__item:hover,
.el-tabs__item.is-active {
	// color: $mainColor !important;
}
.el-tabs__active-bar {
	// background-color: $mainColor !important;
}

// .el-dropdown-menu__item:focus,
// .el-dropdown-menu__item:not(.is-disabled):hover {
//   background-color: #fef0f0 !important;
//   color: #f56c6c !important;
// }
.el-menu--horizontal > .el-menu-item.is-active {
	border-bottom: 2px solid $secondColor !important;
}
</style>
